Skip to content

Conversation

@ghalse
Copy link

@ghalse ghalse commented Apr 30, 2025

If we set the expiresAfter option in metarefresh's config, we effectively alter the inbound metadata. Thus when we're conditionally GETting, we need to be aware that we've introduced a validUntil attribute that the remote server may not know about. That means we might need to force a refresh of the source even if the remote server does not think it has been modified.

If we set the `expiresAfter` option in metarefresh's config, we
effectively alter the inbound metadata. Thus when we're conditionally
GETting, we need to be aware that we've introduced a validUntil
attribute that the remote server may not know about. That means we
might need to force a refresh of the source even if the remote server
does not think it has been modified.
Copy link
Author

@ghalse ghalse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because metarefresh is typically called periodically by cron, we can't force the refresh at exactly the expiry time. To avoid metadata expiring between calls, we need a bit of a buffer. The choice of one hour for the buffer is essentially arbitrary, but based on the example config setting 'cron' => ['hourly'].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant